package com.maegul.service.implementation;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.maegul.data.dao.impl.MediaItemDao;
import com.maegul.data.entities.MediaItem;
import com.maegul.service.ItemService;

@Service(value = "itemService")
@Transactional(rollbackFor = Exception.class)
public class ItemFindService implements ItemService {
	
	@Autowired
	private MediaItemDao mediaItemDao;

	/* (non-Javadoc)
	 * @see com.maegul.service.ItemService#findByName(java.lang.String)
	 */
	public MediaItem findByName(String name) {
		return mediaItemDao.findByName(name);
	}

	/* (non-Javadoc)
	 * @see com.maegul.service.ItemService#findByType(java.lang.String)
	 */
	public List<MediaItem> findByType(String type) {
		return mediaItemDao.findByType(type);
	}

}
